},
}, class RadialShaderEffect extends Shell.GLSLEffect {
_init(params) {
+ this._brightness = undefined;
+ this._sharpness = undefined;
+
super._init(params);
this._brightnessLocation = this.get_uniform_location('brightness');
this._sharpnessLocation = this.get_uniform_location('vignette_sharpness');
- this._setBrightnessUniform();
- this._setSharpnessUniform();
+ this.brightness = 1.0;
+ this.sharpness = 0.0;
}
vfunc_build_pipeline() {
VIGNETTE_DECLARATIONS, VIGNETTE_CODE, true);
}
- _setBrightnessUniform() {
+ get brightness() {
+ return this._brightness;
+ }
+
+ set brightness(v) {
+ if (this._brightness === v)
+ return;
+ this._brightness = v;
this.set_uniform_float(this._brightnessLocation,
- 1, [this.brightness]);
+ 1, [this._brightness]);
+ this.notify('brightness');
}
- _setSharpnessUniform() {
+ get sharpness() {
+ return this._sharpness;
+ }
+
+ set sharpness(v) {
+ if (this._sharpness === v)
+ return;
+ this._sharpness = v;
this.set_uniform_float(this._sharpnessLocation,
- 1, [this.sharpness]);
+ 1, [this._sharpness]);
+ this.notify('sharpness');
}
});